Establishing a data mangement fee structure based on fine grained data entities

ABSTRACT

Systems, methods and articles of manufacture for accessing data for a fee are provided. Fee schedules are defined for any arbitrary granularity of data, including for fields and data structures (e.g., tables in a database). Fees may be calculated based on the type of operation to be performed. Fees may also be calculated per operation and/or per data item involved in the operation.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a divisional of co-pending U.S. patent applicationSer. No. 10/601,995 filed Jun. 23, 2003, which is hereby incorporatedherein in its entirety.

BACKGROUND

The present invention generally relates to data processing, and moreparticularly, to accessing data through a logical framework.

Information Technology (IT) encompasses all forms of technology used tocreate, store, exchange, and use information in its various forms(business data, voice conversations, still images, motion pictures,multimedia presentations, and other forms, including those not yetconceived). While information technology provides significant benefitsto users, the providers of such technology often incur substantialcosts. As such, it is common for providers to charge a fee for servicesrendered. For example, many service providers manage informationdatabases and allow fee-based access to the databases. Such databasesare particularly prevalent in various professions (e.g., medical, legal,etc.) as well as in research and development. However, such serviceproviders in the information technology industry are providing userswith access to databases using relatively inflexible and restrictive feemodels.

Consider a service provider who owns and manages a repository ofinformation which they provide fee-based access to. It may be a databaseof medical research information or any other kind of data that is ofvalue within a particular domain. There are a number of methodsestablished today which govern the fee structure for these kinds ofenvironments. In some cases, the service provider may charge an annualfee for the right to access information in the repository. In othercases, the service provider may charge a per transaction fee forinformation retrieved. These models are adequate if all data in therepository is considered of equal value, but do not address issues wherethe value of information can vary between various entities in therepository.

Consider further service providers that are in the data hostingbusiness, i.e., those who provide data storage and management servicesfor a fee. One model that is used today involves a fee structure basedon the volume of data stored. In this case, all types of data areconsidered equal; all types of data are viewed as simply a set of bytesbeing stored. This model works adequately if there is no distinctionbetween how different types of data are managed, but is not a goodsolution if there are different types of services provided for differenttypes of information. For example, assume a service provider who isstoring patient demographic, account, test result and medical diagnosisinformation for a given client. There may be different levels of serviceassociated with each type of information. The service provider mayprovide services to secure patient authorization to use data forresearch that would apply to individual patients stored in therepository. The service provider may need to provide more stringentaccess control and data encryption support for certain types of data.There may also be a set of data analysis services provided for sometypes of information. Existing fee models do not account for thesevariations on the type of data stored and services associated with thatdata.

Therefore, what is needed is a more flexible fee based model foraccessing data.

SUMMARY

Systems, methods and articles of manufacture for accessing data for afee are provided. Fee schedules are defined for any arbitrarygranularity of data, including for fields and data structures (e.g.,tables in a database). Fees may be calculated based on the type ofoperation to be performed. Fees may also be calculated per operationand/or per data item involved in the operation.

In a particular embodiment physical data is accessed through anabstraction model which defines fee schedules. The abstraction modelincludes metadata describing and defining a plurality of logical fields.In one embodiment, the metadata also describes associations between setsof logical fields each of which may correspond to (i.e., point to)separate physical entities. The sets of logical fields are referred toas model entities, which facilitate accessing physical data. In somecases, a model entity may also be defined by a single logical fieldcorresponding to a single physical entity. Whether or not model entitiesare defined, a fee may be associated with one or more logical fields.The fee may be based, for example, on the type of operation, the numberof items involved in an operation and/or on the number of requests madewith respect to a logical field.

One embodiment provides a method of providing fee-based access to data,including providing an abstract model for logically defining abstractoperations to access the data. The abstract model may include (i) aplurality of logical fields; (ii) a mapping rule for each of theplurality of logical fields, which map the plurality of logical fieldsto physical entities of the data; and (iii) a fee schedule for each ofthe plurality of logical fields, wherein each fee schedule for a givenlogical field defines a fee to be charged when the given logical fieldis involved in an abstract operation to access a physical entitycorresponding to the given logical field.

Another embodiment provides a method of providing fee-based access tophysical data comprising a plurality of physical entities eachcomprising a plurality of physical fields. The method includes providingan abstract model for defining abstract operation specificationslogically describing operations to access the data. The abstract modelmay include (a) a plurality of logical fields; (b) a mapping rule foreach of the plurality of logical fields, which map each of the pluralityof logical fields to at least one of the physical entities of the data;(c) a plurality of model entity definitions, each comprising at leastone logical field corresponding to a physical field of a physicalentity; and (d) a logical field fee schedule for each of the pluralityof logical fields, wherein the fee schedules each specify a fee foraccessing a corresponding physical field as part of a physicaloperation.

Another embodiment provides a method of providing fee-based access todata comprising a plurality of physical entities, each comprising aplurality of physical fields. The method includes receiving instructionsto perform an operation for accessing the data; performing theoperation; determining field-specific fees for each of a plurality ofthe physical fields accessed by the operation; and calculating a totalfee to be charged to a user for the operation.

Yet another embodiment provides a computer-readable medium containing aprogram which, when executed by a processor, performs operations foraccessing physical data comprising a plurality of physical entities,each having a plurality of physical fields. The operation includesreceiving instructions to perform an operation accessing the data;causing performance of the operation; determining field-specific feesfor each of a plurality of the physical fields accessed by theoperation; and calculating a total fee to be charged to a user for theoperation.

Yet another embodiment provides a method for constructing abstractqueries defined by a plurality of logical fields which map to aplurality of physical entities of physical data having a particularphysical data representation in a database. The method includesreceiving user input via a user interface, the input comprising areference to a model entity definition comprising: (i) two or morelogical fields each corresponding to a separate physical entity; and(ii) a fee schedule for accessing physical entities based on the modelentity definition. Based on the model entity definition, at least one ofthe two or more logical fields is selectively added to an abstractquery. The method further includes receiving a plurality of abstractquery contributions for the abstract query, wherein the plurality ofabstract query contributions are defined by selected logical fields anda corresponding value for each of the selected logical fields; andreceiving a plurality of result fields for the abstract query arereceived, wherein the plurality of result fields is defined by selectedlogical fields. The abstract query is then converted into a physicalquery consistent with the particular physical data representation of thedata. The physical query is then executed and, on the basis of the feeschedule, a fee to charge for execution of the physical query iscalculated.

Still another embodiment provides a method for modifying physical datacomprising a plurality of physical entities and having a particularphysical data representation in a database. The method includesreceiving a selection of an abstract modification operation; receiving aselection of a model entity definition on which to perform the abstractmodification operation, the model entity definition comprising two ormore logical fields each corresponding to a separate physical entity;based on at least the received selections, generating at least twophysical modification statements, each modifying one of the two separatephysical entities of the physical data; ordering the at least twophysical modification statements; executing modification operationsaccording to the physical modification statements, whereby the data ismodified; and calculating a fee to charge for executing the modificationoperations based on a defined fee schedule for the model entitydefinition.

Still another embodiment provides a method of providing a logicalframework for defining abstract operations for accessing physical datacomprising a plurality of physical entities each comprising a pluralityof physical fields, the method including providing an abstract model fordefining abstract operation specifications logically describingoperations to access the data. The abstract model includes (a) aplurality of logical fields; (b) a mapping rule for each of theplurality of logical fields, which map each of the plurality of logicalfields to at least one of the physical entities of the data; (c) aplurality of model entity definitions, each comprising at least onelogical field corresponding to a physical field of a physical entity;and (d) model entity fee schedules for each of the plurality of modelentity definitions, wherein the fee schedules each specify a fee foraccessing a physical field of the corresponding model entity definition.The method further includes providing a run-time component to transform,according to the abstract model, abstract operation specifications intophysical operation specifications consistent with the physical data,wherein each abstract operation specification includes at least oneuser-selected model entity definitions of the plurality of model entitydefinitions.

In still another embodiment a computer-readable medium containing aprogram which, when executed by a processor, provides a logicalframework for defining abstract query operations. The program includesan abstract model for defining abstract queries logically describingoperations to query the data, the abstract model including (i) aplurality of logical fields; (ii) a mapping rule for each of theplurality of logical fields, which map the plurality of logical fieldsto physical entities of the data; and (iii) a fee schedule for each ofthe plurality of logical fields. The program further includes a run-timecomponent configured with transformation instructions to transform anabstract query, comprising logical fields selected from the plurality oflogical fields, into a physical query consistent with the physical data;and a fee calculator configured to calculate a fee for executingphysical queries based on the fee schedules.

Still another embodiment provides a computer comprising a memory and atleast one processor, and further comprising a logical framework fordefining abstract modification operations for modifying physical data,the logical framework including an abstract model for defining anabstract modification specification logically describing an operation tomodify the data. The abstract model includes (i) a plurality of logicalfields; (ii) a mapping rule for each of the plurality of logical fields,which map the plurality of logical fields to physical entities of thedata; and (iii) a fee schedule for each of the plurality of logicalfields. The logical framework further includes a run-time component totransform an abstract query, comprising logical fields selected from theplurality of logical fields, into a physical query consistent with thephysical data; and a fee calculator configured to calculate a fee forexecuting physical queries based on the fee schedules.

Still another embodiment provides a method for providing fee-basedaccess to data comprising a plurality of physical entities, eachcomprising a plurality of physical fields, the method comprisingreceiving, via a user interface, user input comprising instructions foran operation for accessing the data selected fields of the plurality ofthe physical fields; determining field-specific fees for each of theselected fields; calculating a fee to be charged to a user for accessingthe selected fields; and displaying the fee to the user via a userinterface.

Still another embodiment provides a method for displaying feeinformation for fee-based access to data comprising a plurality ofphysical entities, each comprising a plurality of physical fields. Themethod comprises displaying one or more user interface screens forconstruction of queries; receiving, via the one or more user interfacescreens, user input defining a query configured to access selectedfields of the plurality of physical fields; and displaying, via the oneor more user interface screens, a field-specific access fee for each ofthe selected fields.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

So that the manner in which the above recited features, advantages andobjects of the present invention are attained and can be understood indetail, a more particular description of the invention, brieflysummarized above, may be had by reference to the embodiments thereofwhich are illustrated in the appended drawings.

It is to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments.

FIG. 1 is a block diagram of an illustrative computer architecture.

FIGS. 2A-2B are relational views of software components of embodimentsof the invention configured to process queries against a physical datasource through an abstract representation of the physical data source.

FIG. 3 is a flow chart illustrating the operation of a runtimecomponent.

FIG. 4 is a flow chart illustrating the operation of a runtimecomponent.

FIG. 5 is a view of an abstraction layer defining model entities havingphysical counterparts in a physical data source.

FIG. 6 is an illustrative model entity specification for a Patiententity and a Test entity.

FIG. 7 illustrates the augmentation of result fields of an initialabstract query according to a specified model entity.

FIGS. 8-12 are illustrative user interface screens for creating anabstract query using model entities.

FIG. 13 is a flow chart for augmenting query result fields according toa specified model entity.

FIG. 14 illustrates the generation of a physical query based on thespecification of a model entity.

FIG. 15 is a flow chart of a method for generating a physical querybased on the specification of a model entity.

FIG. 16 illustrates the use of a model entity to represent a set ofquery result fields.

FIG. 17 is a flow chart of a method for expanding the result fields ofan abstract query based on the specification of a model entity.

FIG. 18 is a simplified view of the environment shown in FIG. 5, andillustrating the modification of a data source by abstract modificationoperations constructed based on model entities

FIG. 19 is a flow chart illustrating the generation of an abstractinsert specification used to implement an insert operation againstphysical data.

FIGS. 20A-B are flow charts illustrating the determination of requiredand optional fields in an insert operation.

FIG. 21 is a flow chart illustrating the conversion of an abstractinsert operation to a physical insert operation.

FIG. 22 is a flow chart illustrating sorting of an insert statement listto ensure a proper order of execution.

FIGS. 23-26 are a series of graphical user interfaces for creating aquery and displaying a calculated fee for the query.

FIG. 27 is a flow chart illustrating generation of an abstract deletespecification used to implement a delete operation against physical datadelete operation.

FIGS. 28-29 are flow charts illustrating the conversion of an abstractdelete operation to a physical delete operation and the generation ofselection logic for an abstract update operation, respectively.

FIG. 30 is a flow chart illustrating sorting of a delete statement listto ensure a proper order of execution.

FIG. 31 is the abstraction layer of FIG. 5 additionally configured withfee schedules.

FIG. 32 is a detailed view of an illustrative data model.

FIG. 33 is an illustrative model entity specification for a Patiententity and a Test entity.

FIGS. 34A-B (collectively referred to as FIG. 34) are flow chartsillustrating fee-based query and insert operations.

FIGS. 35A-B (collectively referred to as FIG. 35) are flow chartsillustrating fee-based update operations.

FIG. 36-41 are a series of graphical user interfaces for creating aquery and displaying a calculated fee for the query.

DETAILED DESCRIPTION Introduction

Systems, methods and articles of manufacture for accessing data for afee are provided. Fee schedules are defined for any arbitrarygranularity of data, including for fields and data structures (e.g.,tables in a database). In one embodiment, fees are calculated based onthe type of operation to be performed. Fees may also be calculated peroperation and/or per data item involved in the operation.

In a particular embodiment, physical data is accessed through anabstraction model which defines fee schedules corresponding to thephysical data accessed. In one embodiment, a particular data definitionframework (also referred to herein as a data abstraction model (DAM)) isprovided for accessing and modifying data independent of the particularmanner in which the data is physically represented. The data may belocated in a single repository (i.e., source) of data or a plurality ofdifferent data repositories. Thus, the DAM may provide a logical view ofone or more underlying data repositories. By using an abstractrepresentation of a data repository, the underlying physicalrepresentation can be more easily changed or replaced without affectingthe application making the changes. Instead, the abstract representationis changed with no changes required by the application. In addition,multiple abstract data representations can be defined to supportdifferent applications against the same underlying database schema thatmay have different default values or required fields.

The DAM includes metadata describing and defining a plurality of logicalfields. The metadata also describes associations between sets of logicalfields. The sets of logical fields are referred to as model entities.The model entities are used to access data through queries andmodification operations. In one aspect, model entities define requiredoutput fields for queries involving the model entity. In another aspect,model entities establish a focal point within the data environment thatcan be used to implement the appropriate logic needed to correlateinformation that spans multiple physical entities (e.g. tables) in theunderlying physical data repository. In still another aspect, modelentities define a minimal set of fields used to derive the complete setof fields involved in data insert and delete operations for an instanceof the model entity.

In one embodiment, the DAM includes fee schedules for individual logicalfields, categories of logical fields or the model entities. The feeschedules may be structured, for example, according to the operation tobe performed (e.g., query, insert, update, delete) and on a per item orper request basis.

One embodiment of the invention is implemented as a program product foruse with a computer system and described below. The program(s) of theprogram product defines functions of the embodiments (including themethods described herein) and can be contained on a variety ofsignal-bearing media. Illustrative signal-bearing media include, but arenot limited to: (i) information permanently stored on non-writablestorage media (e.g., read-only memory devices within a computer such asCD-ROM disks readable by a CD-ROM drive); (ii) alterable informationstored on writable storage media (e.g., floppy disks within a diskettedrive or hard-disk drive); or (iii) information conveyed to a computerby a communications medium, such as through a computer or telephonenetwork, including wireless communications. The latter embodimentspecifically includes information downloaded from the Internet and othernetworks. Such signal-bearing media, when carrying computer-readableinstructions that direct the functions of the present invention,represent embodiments of the present invention.

In general, the routines executed to implement the embodiments of theinvention, may be part of an operating system or a specific application,component, program, module, object, or sequence of instructions. Thesoftware of the present invention typically is comprised of a multitudeof instructions that will be translated by the native computer into amachine-readable format and hence executable instructions. Also,programs are comprised of variables and data structures that eitherreside locally to the program or are found in memory or on storagedevices. In addition, various programs described hereinafter may beidentified based upon the application for which they are implemented ina specific embodiment of the invention. However, it should beappreciated that any particular nomenclature that follows is used merelyfor convenience, and thus the invention should not be limited to usesolely in any specific application identified and/or implied by suchnomenclature.

Physical View of Environment

FIG. 1 depicts a block diagram of a networked system 100 in whichembodiments of the present invention may be implemented. In general, thenetworked system 100 includes a client (i.e., generally any requestingentity such as a user or application) computer 102 (three such clientcomputers 102 are shown) and at least one server computer 104 (one suchserver computer 104 is shown). The client computer 102 and the servercomputer 104 are connected via a network 126. In general, the network126 may be a local area network (LAN) and/or a wide area network (WAN).In a particular embodiment, the network 126 is the Internet. However, itis noted that aspects of the invention need not be implemented in adistributed environment. As such, the client computers 102 and theserver computer 104 are more generally representative of any requestingentity (such as a user or application) issuing queries and a receivingentity configured to handle the queries, respectively.

The client computer 102 includes a Central Processing Unit (CPU) 110connected via a bus 130 to a memory 112, storage 114, an input device116, an output device 119, and a network interface device 118. The inputdevice 116 can be any device to give input to the client computer 102.For example, a keyboard, keypad, light-pen, touch-screen, track-ball, orspeech recognition unit, audio/video player, and the like could be used.The output device 119 can be any device to give output to the user,e.g., any conventional display screen. Although shown separately fromthe input device 116, the output device 119 and input device 116 couldbe combined. For example, a display screen with an integratedtouch-screen, a display with an integrated keyboard, or a speechrecognition unit combined with a text speech converter could be used.

The network interface device 118 may be any entry/exit device configuredto allow network communications between the client computer 102 and theserver computer 104 via the network 126. For example, the networkinterface device 118 may be a network adapter or other network interfacecard (NIC).

Storage 114 is preferably a Direct Access Storage Device (DASD).Although it is shown as a single unit, it could be a combination offixed and/or removable storage devices, such as fixed disc drives,floppy disc drives, tape drives, removable memory cards, or opticalstorage. The memory 112 and storage 114 could be part of one virtualaddress space spanning multiple primary and secondary storage devices.

The memory 112 is preferably a random access memory sufficiently largeto hold the necessary programming and data structures of the invention.While the memory 112 is shown as a single entity, it should beunderstood that the memory 112 may in fact comprise a plurality ofmodules, and that the memory 112 may exist at multiple levels, from highspeed registers and caches to lower speed but larger DRAM chips.

Illustratively, the memory 112 contains an operating system 124.Illustrative operating systems, which may be used to advantage, includeLinux and Microsoft's Windows®. More generally, any operating systemsupporting the functions disclosed herein may be used.

The memory 112 is also shown containing a browser program 122 that, whenexecuted on CPU 110, provides support for navigating between the variousservers 104 and locating network addresses at one or more of the servers104. In one embodiment, the browser program 122 includes a web-basedGraphical User Interface (GUI), which allows the user to display HyperText Markup Language (HTML) information. More generally, however, thebrowser program 122 may be any GUI-based program capable of renderingthe information transmitted from the server computer 104.

The server computer 104 may be physically arranged in a manner similarto the client computer 102. Accordingly, the server computer 104 isshown generally comprising a CPU 130, a memory 132, and a storage device134, coupled to one another by a bus 136. Memory 132 may be a randomaccess memory sufficiently large to hold the necessary programming anddata structures that are located on the server computer 104.

The server computer 104 is generally under the control of an operatingsystem 138 shown residing in memory 132. Examples of the operatingsystem 138 include IBM OS/400®, UNIX, Microsoft Windows®, and the like.More generally, any operating system capable of supporting the functionsdescribed herein may be used.

The memory 132 further includes one or more applications 140 and anabstract query interface 146. The applications 140 and the abstractoperation interface 146 are software products comprising a plurality ofinstructions that are resident at various times in various memory andstorage devices in the computer system 100. When read and executed byone or more processors 130 in the server 104, the applications 140 andthe abstract operation interface 146 cause the computer system 100 toperform the steps necessary to execute steps or elements embodying thevarious aspects of the invention. The applications 140 (and moregenerally, any requesting entity, including the operating system 138and, at the highest level, users) issue queries against a database.Illustrative sources against which queries may be issued include localdatabases 156 ₁ . . . 156 _(N), and remote databases 157 ₁ . . . 157_(N), collectively referred to as database(s) 156-157). Illustratively,the databases 156 are shown as part of a database management system(DBMS) 154 in storage 134. More generally, as used herein, the term“databases” refers to any collection of data regardless of theparticular physical representation. By way of illustration, thedatabases 156-157 may be organized according to a relational schema(accessible by SQL operations) or according to an XML schema (accessibleby XML operations). However, the invention is not limited to aparticular schema and contemplates extension to schemas presentlyunknown. As used herein, the term “schema” generically refers to aparticular arrangement of data which is described by a data definitionframework such as the DAM described herein.

In one embodiment, the operations (e.g., queries, inserts, updates,deletes) issued by the applications 140 are defined according to anapplication operation specification 142 included with each application140. The operations issued by the applications 140 may be predefined(i.e., hard coded as part of the applications 140) or may be generatedin response to input (e.g., user input). In either case, the operations(referred to herein as “abstract operations”) are composed using logicalfields defined by the abstract operation interface 146. In particular,the logical fields used in the abstract operations are defined by a dataabstraction model 148 of the abstract operations interface 146. Theabstract operations are executed by a runtime component 150 whichtransforms the abstract operations into a form consistent with thephysical representation of the data contained in one or more of thedatabases 156-157. The operations may be configured to access the dataand return results (i.e., query the data), or to modify (i.e., insert,delete or update) the data. The application operation specification 142and the abstract operation interface 146 are further described withreference to FIGS. 2A-B.

In one embodiment, the server computer 104 is further configured with afee calculator 151. Illustratively, the fee calculator 151 is shown aspart of the runtime component 150, although it may alternatively be aseparate component. In any case, the fee calculator 151 is invoked tocalculate the cost of an operation, such as a query, insert, update ordelete.

In one embodiment, elements of an abstract operation are specified by auser through a graphical user interface (GUI). The content of the GUIsis generated by the application(s) 140. In a particular embodiment, theGUI content is hypertext markup language (HTML) content which may berendered on the client computer systems 102 with the browser program122. Accordingly, the memory 132 includes a Hypertext Transfer Protocol(http) server process 152 (e.g., a web server) adapted to servicerequests from the client computer 102. For example, the process 152 mayrespond to requests to access a database(s) 156, which illustrativelyresides on the server 104. Incoming client requests for data from adatabase 156-157 invoke an application 140. When executed by theprocessor 130, the application 140 causes the server computer 104 toperform the steps or elements embodying the various aspects of theinvention, including accessing the database(s) 156-157. In oneembodiment, the application 140 comprises a plurality of servletsconfigured to build GUI elements, which are then rendered by the browserprogram 122. Where the remote databases 157 are accessed via theapplication 140, the data abstraction model 148 is configured with alocation specification identifying the database containing the data tobe retrieved. This latter embodiment will be described in more detailbelow.

FIG. 1 is merely one hardware/software configuration for the networkedclient computer 102 and server computer 104. Embodiments of the presentinvention can apply to any comparable hardware configuration, regardlessof whether the computer systems are complicated, multi-user computingapparatus, single-user workstations, or network appliances that do nothave non-volatile storage of their own. Further, it is understood thatwhile reference is made to particular markup languages, including HTML,the invention is not limited to a particular language, standard orversion. Accordingly, persons skilled in the art will recognize that theinvention is adaptable to other markup languages as well as non-markuplanguages and that the invention is also adaptable future changes in aparticular markup language as well as to other languages presentlyunknown. Likewise, the http server process 152 shown in FIG. 1 is merelyillustrative and other embodiments adapted to support any known andunknown protocols are contemplated.

Logical/Runtime View of Environment

FIGS. 2A-B show a plurality of interrelated components of the invention.By way of illustration, the embodiment represented by FIGS. 2A-B (aswell as FIGS. 3-4) is described with reference to queries. However, moregenerally, the operation to be performed may be any operation affectingdata (i.e., insert, delete, update). The requesting entity (e.g., one ofthe applications 140) issues a query 202 as defined by the respectiveapplication operation specification 142 of the requesting entity. Theresulting query 202 is generally referred to herein as an “abstractquery” because the query is composed according to abstract (i.e.,logical) fields rather than by direct reference to the underlyingphysical data entities in the databases 156-157. As a result, abstractqueries may be defined that are independent of the particular underlyingdata representation used. In one embodiment, the application operationspecification 142 may include both criteria used for data selection(selection criteria 204) and an explicit specification of the fields tobe returned (return data specification 206) based on the selectioncriteria 204.

The logical fields specified by the application operation specification142 and used to compose the abstract query 202 are defined by the dataabstraction model 148. In general, the data abstraction model 148exposes information as a set of logical fields that may be used within aquery (e.g., the abstract query 202) issued by the application 140 tospecify criteria for data selection and specify the form of result datareturned from a query operation. The logical fields are definedindependently of the underlying data representation being used in thedatabases 156-157, thereby allowing queries to be formed that areloosely coupled to the underlying data representation.

In general, the data abstraction model 148 comprises a plurality offield specifications 208 ₁, 208 ₂, 208 ₃, 208 ₄ and 208 ₅ (five shown byway of example), collectively referred to as the field specifications208. Specifically, a field specification is provided for each logicalfield available for composition of an abstract query. Each fieldspecification comprises a logical field name 210 ₁, 210 ₂, 210 ₃, 210 ₄,210 ₅ (collectively, field name 210) and an associated access method 212₁, 212 ₂, 212 ₃, 212 ₄, 212 ₅ (collectively, access method 212). Theaccess methods associate (i.e., map) the logical field names to aparticular physical data representation 214 ₁, 214 ₂ . . . 214 _(N) in adatabase (e.g., one of the databases 156). By way of illustration, twodata representations are shown, an XML data representation 214 ₁ and arelational data representation 214 ₂. However, the physical datarepresentation 214 _(N) indicates that any other data representation,known or unknown, is contemplated.

Any number of access methods are contemplated depending upon the numberof different types of logical fields to be supported. In one embodiment,access methods for simple fields, filtered fields and composed fieldsare provided. The field specifications 208 ₁, 208 ₂ and 208 ₅ exemplifysimple field access methods 212 ₁, 212 ₂, and 212 ₅, respectively.Simple fields are mapped directly to a particular entity in theunderlying physical data representation (e.g., a field mapped to a givendatabase table and column). By way of illustration, the simple fieldaccess method 212 ₁ shown in FIG. 2B maps the logical field name 210 ₁(“FirstName”) to a column named “f_name” in a table named “contact”. Thefield specification 208 ₃ exemplifies a filtered field access method 212₃. Filtered fields identify an associated physical entity and providerules used to define a particular subset of items within the physicaldata representation. An example is provided in FIG. 2B in which thefiltered field access method 212 ₃ maps the logical field name 210 ₃(“AnytownLastName”) to a physical entity in a column named “1_name” in atable named “contact” and defines a filter for individuals in the cityof Anytown. Another example of a filtered field is a New York ZIP codefield that maps to the physical representation of ZIP codes andrestricts the data only to those ZIP codes defined for the state of NewYork. The field specification 208 ₄ exemplifies a composed field accessmethod 212 ₄. Composed access methods compute a logical field from oneor more physical fields using an expression supplied as part of theaccess method definition. In this way, information which does not existin the underlying data representation may computed. In the exampleillustrated in FIG. 2B the composed field access method 212 ₃ maps thelogical field name 210 ₃ “AgeInDecades” to “AgeInYears/10”. Anotherexample is a sales tax field that is composed by multiplying a salesprice field by a sales tax rate.

It is noted that the data abstraction model 148 shown in FIG. 2B ismerely illustrative of selected logical field specifications and is notintended to be comprehensive. As such, the abstract query 202 shown inFIG. 2B includes some logical fields for which specifications are notshown in the data abstraction model 148, such as “State” and “Street”.

It is contemplated that the formats for any given data type (e.g.,dates, decimal numbers, etc.) of the underlying data may vary.Accordingly, in one embodiment, the field specifications 208 include atype attribute which reflects the format of the underlying data.However, in another embodiment, the data format of the fieldspecifications 208 is different from the associated underlying physicaldata, in which case an access method is responsible for returning datain the proper format assumed by the requesting entity. Thus, the accessmethod must know what format of data is assumed (i.e., according to thelogical field) as well as the actual format of the underlying physicaldata. The access method can then convert the underlying physical datainto the format of the logical field.

By way of example, the field specifications 208 of the data abstractionmodel 148 shown in FIG. 2A are representative of logical fields mappedto data represented in the relational data representation 214 ₂.However, other instances of the data abstraction model 148 map logicalfields to other physical data representations, such as XML. Further, inone embodiment, a data abstraction model 148 is configured with accessmethods for procedural data representations. One embodiment of such adata abstraction model 148 is described below with respect to FIG. 8.

An illustrative abstract query corresponding to the abstract query 202shown in FIG. 2 is shown in Table I below. By way of illustration, thedata repository abstraction 148 is defined using XML. However, any otherlanguage may be used to advantage.

TABLE I QUERY EXAMPLE 001 <?xml version=“1.0”?> 002 <!--Query stringrepresentation: (FirstName = “Mary” AND LastName = 003 “McGoon”) ORState = “NC”--> 004 <QueryAbstraction> 005 <Selection> 006 <ConditioninternalID=“4”> 007 <Condition field=“FirstName” operator=“EQ”value=“Mary” 008 internalID=“1”/> 009 <Condition field=“LastName”operator=“EQ” value=“McGoon” 010 internalID=“3”relOperator=“AND”></Condition> 011 </Condition> 012 <Conditionfield=“State” operator=“EQ” value=“NC” internalID=“2” 013relOperator=“OR”></Condition> 014 </Selection> 015 <Results> 016 <Fieldname=“FirstName”/> 017 <Field name=“LastName”/> 018 <Fieldname=“State”/> 019 </Results> 020 </QueryAbstraction>Illustratively, the abstract query shown in Table I includes a selectionspecification (lines 005-014) containing selection criteria and aresults specification (lines 015-019). In one embodiment, a selectioncriterion consists of a field name (for a logical field), a comparisonoperator (=, >, <, etc) and a value expression (what is the field beingcompared to). In one embodiment, result specification is a list ofabstract fields that are to be returned as a result of query execution.A result specification in the abstract query may consist of a field nameand sort criteria.

An illustrative instance of a data abstraction model 148 correspondingto the abstract query in Table I is shown in Table II below. By way ofillustration, the data abstraction model 148 is defined using XML.However, any other language may be used to advantage.

TABLE II DATA REPOSITORY ABSTRACTION EXAMPLE 001 <?xml version=“1.0”?>002 <DataRepository> 003 <Category name=“Demographic”> 004 <Fieldqueryable=“Yes” name=“FirstName” displayable=“Yes”> 005 <AccessMethod>006 <Simple columnName=“f_name” tableName=“contact”></Simple> 007</AccessMethod> 008 <Type baseType=“char”></Type> 009 </Field> 010<Field queryable=“Yes” name=“LastName” displayable=“Yes”> 011<AccessMethod> 012 <Simple columnName=“l_name”tableName=“contact”></Simple> 013 </AccessMethod> 014 <TypebaseType=“char”></Type> 015 </Field> 016 <Field queryable=“Yes”name=“State” displayable=“Yes”> 017 <AccessMethod> 018 <SimplecolumnName=“state” tableName=“contact”></Simple> 019 </AccessMethod> 020<Type baseType=“char”></Type> 021 </Field> 022 </Category> 023</DataRepository>

Note that lines 004-009 correspond to the first field specification 208₁ of the DAM 148 shown in FIG. 2B and lines 010-015 correspond to thesecond field specification 208 ₂. For brevity, the other fieldspecifications defined in Table I have not been shown in FIG. 2B. Notealso that Table I illustrates a category, in this case “Demographic”. Acategory is a grouping of one or more logical fields. In the presentexample, “First Name”, “Last Name” and “State” are logical fieldsbelonging to the common category, “Demographic”.

FIG. 3 shows an illustrative runtime method 300 exemplifying oneembodiment of the operation of the runtime component 150. The method 300is entered at step 302 when the runtime component 150 receives as inputan instance of an abstract query (such as the abstract query 202 shownin FIG. 2). At step 304, the runtime component 150 reads and parses theinstance of the abstract query and locates individual selection criteriaand desired result fields. At step 306, the runtime component 150 entersa loop (comprising steps 306, 308, 310 and 312) for processing eachquery selection criteria statement present in the abstract query,thereby building a data selection portion of a Concrete Query. In oneembodiment, a selection criterion consists of a field name (for alogical field), a comparison operator (=, >, <, etc) and a valueexpression (what is the field being compared to). At step 308, theruntime component 150 uses the field name from a selection criterion ofthe abstract query to look up the definition of the field in the datarepository abstraction 148. As noted above, the field definitionincludes a definition of the access method used to access the physicaldata associated with the field. The runtime component 150 then builds(step 310) a Concrete Query Contribution for the logical field beingprocessed. As defined herein, a Concrete Query Contribution is a portionof a concrete query that is used to perform data selection based on thecurrent logical field. A concrete query is a query represented inlanguages like SQL and XML Query and is consistent with the data of agiven physical data repository (e.g., a relational database or XMLrepository). Accordingly, the concrete query is used to locate andretrieve data from a physical data repository, represented by thedatabases 156-157 shown in FIG. 1. The Concrete Query Contributiongenerated for the current field is then added to a Concrete QueryStatement. The method 300 then returns to step 306 to begin processingfor the next field of the abstract query. Accordingly, the processentered at step 306 is iterated for each data selection field in theabstract query, thereby contributing additional content to the eventualquery to be performed.

After building the data selection portion of the concrete query, theruntime component 150 identifies the information to be returned as aresult of query execution. As described above, in one embodiment, theabstract query defines a list of abstract fields that are to be returnedas a result of query execution, referred to herein as a resultspecification. A result specification in the abstract query may consistof a field name and sort criteria. Accordingly, the method 300 enters aloop at step 314 (defined by steps 314, 316, 318 and 320) to add resultfield definitions to the concrete query being generated. At step 316,the runtime component 150 looks up a result field name (from the resultspecification of the abstract query) in the data repository abstraction148 and then retrieves a Result Field Definition from the datarepository abstraction 148 to identify the physical location of data tobe returned for the current logical result field. The runtime component150 then builds (as step 318) a Concrete Query Contribution (of theconcrete query that identifies physical location of data to be returned)for the logical result field. At step 320, Concrete Query Contributionis then added to the Concrete Query Statement. Once each of the resultspecifications in the abstract query has been processed, the query isexecuted at step 322.

One embodiment of a method 400 for building a Concrete QueryContribution for a logical field according to steps 310 and 318 isdescribed with reference to FIG. 4. At step 402, the method 400 querieswhether the access method associated with the current logical field is asimple access method. If so, the Concrete Query Contribution is built(step 404) based on physical data location information and processingthen continues according to method 300 described above. Otherwise,processing continues to step 406 to query whether the access methodassociated with the current logical field is a filtered access method.If so, the Concrete Query Contribution is built (step 408) based onphysical data location information for some physical data entity. Atstep 410, the Concrete Query Contribution is extended with additionallogic (filter selection) used to subset data associated with thephysical data entity. Processing then continues according to method 300described above.

If the access method is not a filtered access method, processingproceeds from step 406 to step 412 where the method 400 queries whetherthe access method is a composed access method. If the access method is acomposed access method, the physical data location for each sub-fieldreference in the composed field expression is located and retrieved atstep 414. At step 416, the physical field location information of thecomposed field expression is substituted for the logical fieldreferences of the composed field expression, whereby the Concrete QueryContribution is generated. Processing then continues according to method300 described above.

If the access method is not a composed access method, processingproceeds from step 412 to step 418. Step 418 is representative of anyother access methods types contemplated as embodiments of the presentinvention. However, it should be understood that embodiments arecontemplated in which less then all the available access methods areimplemented. For example, in a particular embodiment only simple accessmethods are used. In another embodiment, only simple access methods andfiltered access methods are used.

As described above, it may be necessary to perform a data conversion ifa logical field specifies a data format different from the underlyingphysical data. In one embodiment, an initial conversion is performed foreach respective access method when building a Concrete QueryContribution for a logical field according to the method 400. Forexample, the conversion may be performed as part of, or immediatelyfollowing, the steps 404, 408 and 416. A subsequent conversion from theformat of the physical data to the format of the logical field isperformed after the query is executed at step 322. Of course, if theformat of the logical field definition is the same as the underlyingphysical data, no conversion is necessary.

Other Embodiments of Data Repository Abstraction Components

In one embodiment, a different single data abstraction model 148 isprovided for each separate physical data representation 214. In analternative embodiment, a single data abstraction model 148 containsfield specifications (with associated access methods) for two or morephysical data representations 214. In yet another embodiment, multipledata abstraction models 148 are provided, where each data abstractionmodel 148 exposes different portions of the same underlying physicaldata (which may comprise one or more physical data representations 214).In this manner, a single application 140 may be used simultaneously bymultiple users to access the same underlying data where the particularportions of the underlying data exposed to the application aredetermined by the respective data abstraction model 148. This latterembodiment is described in more detail in U.S. patent application Ser.No. 10/132,228, entitled “DYNAMIC END USER SPECIFIC CUSTOMIZATION OF ANAPPLICATION'S PHYSICAL DATA LAYER THROUGH A DATA REPOSITORY ABSTRACTIONLAYER” and assigned to International Business Machines, Inc.

In any case, a data abstraction model 148 contains (or refers to) atleast one access method which maps a logical field to physical data. Tothis end, as illustrated in the foregoing embodiments, the accessmethods describe a means to locate and manipulate the physicalrepresentation of data that corresponds to a logical field. In oneembodiment, the access methods are further configured with a locationspecification defining a location of the data associated with thelogical field. In this way, the data abstraction model 148 is extendedto include description of a multiplicity of data sources that can belocal and/or distributed across a network environment. The data sourcescan be using a multitude of different data representations and dataaccess techniques. In this manner, an infrastructure is provided whichis capable of capitalizing on the distributed environments prevalenttoday. One approach for accessing a multiplicity of data sources isdescribed in more detail in U.S. patent application Ser. No. 10/131,984,entitled “REMOTE DATA ACCESS AND INTEGRATION OF DISTRIBUTED DATA SOURCESTHROUGH DATA SCHEMA AND QUERY ABSTRACTION” and assigned to InternationalBusiness Machines, Inc.

In various embodiments, numerous advantages over the prior art areprovided. In one aspect, advantages are achieved by defining a loosecoupling between the application operation specification and theunderlying data representation. Rather than encoding an application withspecific table, column and relationship information, as is the casewhere SQL is used, the application defines data operation requirementsin a more abstract fashion that are then bound to a particular physicaldata representation at runtime. The loose operation-data coupling of thepresent invention enables requesting entities (e.g., applications) tofunction even if the underlying data representation is modified or ifthe requesting entity is to be used with a completely new physical datarepresentation than that used when the requesting entity was developed.In the case with a given physical data representation is modified orrestructured, the corresponding data repository abstraction is updatedto reflect changes made to the underlying physical data model. The sameset of logical fields are available for use by queries, and have merelybeen bound to different entities or locations in physical data model. Asa result, requesting entities written to the abstract operationinterface continue to function unchanged, even though the correspondingphysical data model has undergone significant change. In the event arequesting entity is to be used with a completely new physical datarepresentation different than that used when the requesting entity wasdeveloped, the new physical data model may be implemented using the sametechnology (e.g., relational database) but following a differentstrategy for naming and organizing information (e.g., a differentschema). The new schema will contain information that may be mapped tothe set of logical fields required by the application using simple,filtered and composed field access method techniques. Alternatively, thenew physical representation may use an alternate technology forrepresenting similar information (e.g., use of an XML based datarepository versus a relational database system). In either case,existing requesting entities written to use the abstract operationinterface can easily migrate to use the new physical data representationwith the provision of an alternate data repository abstraction whichmaps fields referenced in the query with the location and physicalrepresentation in the new physical data model.

In another aspect, the ease-of-use for the application builder and theend-user is facilitated. Use of an abstraction layer to representlogical fields in an underlying data repository enables an applicationdeveloper to focus on key application data requirements without concernfor the details of the underlying data representation. As a result,higher productivity and reduced error rates are achieved duringapplication development. With regard to the end user, the datarepository abstraction provides a data filtering mechanism, exposingpertinent data and hiding nonessential content that is not needed by aparticular class end-user developing the given query.

Solutions implementing the present model use the provided abstractoperation specification to describe its information requirements,without regard for the location or representation of the data involved.Operations, e.g., queries, are submitted to the runtime component whichuses the data abstraction model to determine the location and methodused to access each logical piece of information represented in thequery.

In one aspect, this model allows solutions to be developed independentof the physical location or representation of the data used by thesolution, making it possible to easily deploy the solution to a numberof different data topologies and allowing the solution to function incases where data is relocated or reorganized over time. In anotheraspect, this approach also simplifies the task of extending a solutionto take advantage of additional information. Extensions are made at theabstract query level and do not require addition of software that isunique for the location or representation of the new data beingaccessed. This method provides a common data access method for softwareapplications that is independent of the particular method used to accessdata and of the location of each item of data that is referenced. Thephysical data accessed via an abstract query may be representedrelationally (in an existing relational database system), hierarchically(as XML) or in some other physical data representation model. Amultitude of data access methods are also supported, including thosebased on existing data query methods such as SQL and XQuery and methodsinvolving programmatic access to information such as retrieval of datathrough a Web Service invocation (e.g., using SOAP) or HTTP request.

Model Entities

Aspects of the present invention provide data abstraction model entitiesthat serve to identify a higher level abstraction of the underlying databy representing a composite of individual logical fields. Model entitiesprovide end users and applications a higher level conceptual view of theunderlying data that can simplify data query and modification tasks(i.e., insert and deletion). Rather than having to understand all of theindividual fields that make up entities such as a patient or a lab testresult, the user/application can work at the more conceptual modelentity level. As will be described below in more detail, the definitionof a model entity contains sufficient metadata to streamline andsimplify transactions performed against instances of a model entity.

In the current embodiment, model entities are defined via additionalmetadata to that already found in an abstract data model representation(i.e., the DAM). More generally, however, model entities can be definedwithin an abstract data model definition or could be defined external toan abstract data model definition.

Further, embodiments are described with reference to relationaldatabases. However, the invention is applicable to any other datarepresentation including, for example, markup languages such as XML.

Referring now to FIG. 5, an environment 500 includes a representativedata abstraction model (DAM) 502 configured to support accesses (i.e.,queries and modification operations) of a physical data source. By wayof illustration only, the physical data source being accessed via thedata abstraction model 502 is a relational data source 504 containing aplurality of tables 520-523. However, as described above, any data typeis contemplated.

The data abstraction model 502 generally includes a plurality ofcategories 508 ₁₋₅, a plurality of logical fields specifications 510₁₋₁₆, a model entity specification 525 and a physical entityrelationship specification 526. The categories 508 may be defined for asingle logical field or, more commonly, relate two or more logical fieldspecifications 510. The logical fields specifications 510 includes themetadata described above with respect to FIG. 2, which is not shown forsimplicity. Some aspects of the logical fields specifications describedabove with respect to FIG. 2 are shown in a simplified form. Forexample, reference to logical fields used in defining composed fields isrepresented by arrows, such as in the case of the “Age” logical fieldspecification 510 ₅ and the “Days to Payment” logical fieldspecification 510 ₁₆.

In addition, logical fields specifications 510 include supplementalmetadata used to implement aspects of the invention. For example,selected logical fields are configured with various attributes includinga “required” attribute 514, a “generate” attribute 516 and a “default”attribute 518. Illustratively, the “First Name” logical fieldspecification 510 ₂, the “Last Name” logical field specification 510 ₃,the “City” logical field specification 510 ₈, the “State” logical fieldspecification 510 ₉, the “Postal Code” logical field specification 510₁₀, the “Glucose Test” logical field specification 510 ₁₂, the “AccountNumber” logical field specification 510 ₁₃ and the “Balance” logicalfield specification 510 ₁₄ are configured with the “Required” attribute514. The “Patient ID” logical field specification 510 ₁ is configuredwith the “Generate” attribute 516 and the Test Date logical fieldspecification 510 ₁₁ is configured with the “Default Value” attribute518, where the default value is specified as “Current_Date”.

The model entity specification 525 defines a plurality of model entities506 ₁₋₃ (illustratively three are shown; however, any number of modelentities may be defined). Each model entity has a name. Illustratively,a “Patient” model entity 506 ₁, a “Test” model entity 506 ₂ and an“Account” model entity 506 ₃ are defined by the DAM 502.

By way of illustration, additional details of the Patient and Test modelentities 506 ₁₋₂ are now described with reference to FIG. 6. Althoughnot shown, the details of the “Account” model entity 506 ₃ may have asimilar composition. In addition to a name 602, each model entitydefines multiple sets of fields used to implement query, insert anddelete operations against the physical data corresponding to the modelentity. Specifically, each model entity 506 is partitioned to include aquery portion 604 ₁₋₂, the insert portion 606 ₁₋₂ and a delete portion608 ₁₋₂. The appropriate portion is accessed according to the type ofoperation being run against the model entity 506. Note that for queries,the full complement of fields defining a model entity (e.g., Patient) isspecified, while in the case of inserts and deletes a subset of all thefields defining the model entity is specified. As will be described inmore detail below, the subset of fields include a “seed” field for eachcorresponding physical entity of a model entity. In any case, it shouldbe clear that a portion of a model entity 506 may include only a singlelogical field pointing to a single physical entity. Further, a modelentity 506 may itself only have a single logical field pointing to asingle physical entity. The model entities provide a particularadvantage, however, when they span multiple fields/entities since inthis case users are able to work with a singular abstract representationrather than being burdened with knowing what logical fields make up anabstract entity. In this regard, it is noted that, in practice, eachportion (query, insert and delete) of a model entity 506 is itself amodel entity in that the portions each define an abstract entity for agiven operation, whether the abstract entity spans multiple logicalfields and/or multiple physical fields.

In addition to the model entity metadata, aspects of the invention areimplemented by the physical entity relationships specification 526,which is now described with reference to FIG. 5. The physical entityrelationships specification 526 defines the hierarchical relationshipsbetween entities in a physical model (i.e., the relational database520). By way of illustration, the physical entity relationshipsspecification 526 shown in FIG. 5 relates the patient information table520 to each of the other tables 521-523 in the data source 504. In eachcase, the patient information table 520 is primary with respect to asecondary table. Although not illustrated in the physical entityrelationships specification 526 of FIG. 5, it is contemplated thatadditional levels of hierarchy may be defined. For example, the addressinformation table 521 may be defined as a primary entity with respect tosome other secondary table (referred to for convenience as “Table A”)not shown in FIG. 5. In this case, a three-tiered hierarchy is definedin which the patient information table 520 is the primary entity, theaddress information table 521 is the secondary entity, and Table A isthe tertiary entity. In such an arrangement, the patient informationtable 520 and the address information table 521, and the addressinformation table 521 and Table A are explicitly in a primary-secondaryrelationship, and by syllogism, the patient information table 520 andTable A are in a primary-secondary relationship.

The physical entity relationships specification 526 also indicates thebasis for a primary-secondary relationship between entities.Specifically, the field (i.e., column) on which the relationship isbased is specified in brackets [ ]. In the present illustration, theentity relationships are defined for the patient identifier (“ID” and“PID”, respectively). Although only one field name is shown specifiedfor each entity, two or more may be specified such that each entity isrelated by two or more pairs of fields. Consider the following exampleof a relationship: Entity 1 [field 1, field 3, field 6]→Entity 2 [field2, field 3, field 4]. In this example, the fields 1, 3 and 6 of theprimary entity, Entity 1, are related to fields 2, 3 and 4,respectively, of the secondary entity, Entity 2.

The physical entity relationships specification 526 also specifieswhether a relationship between two entities is one-to-one, one-to-manymany-to-one or many-to-many. This relationship is specified inparentheses ( ) for each entity. For example, the entities “PatientInfo”and “AddressInfo” are in a one-to-one relationship, while the entities“PatientInfo” and “TestInfo” are in a one-to-many relationship.

The DAM 502 allows a requesting entity 512 (e.g., application 140 ofFIG. 1) to access the data source 504 by issuing a request for resultsfrom the data source 504 or by issuing a request to modify data in thedata source 504. Generally, both of these requests may be referred to as“queries”. However, for convenience, only a request for results will bereferred to as a query in the following description.

Query Operations Using Model Entities

In the case of query operations, a set of fields defined by the modelentity 506 in the query portion 604 serves a variety of purposes. First,the query portion 604 specifies those fields that are required outputfrom queries involving the model entity. Required fields for queryresults are identified in the query portion of the model entity by a“required” attribute. For example, the “patient” model entity 506 ₁defines “patient id” as a required field with the provision of arequired attribute 610 in the query portion 604, thereby ensuring thatall query results for patients will include patient id.

As an example of how the required attribute 610 is applied, consider theinitial Abstract Query 700 shown in FIG. 7. The Abstract Query 700represents the initial form of an abstract query as specified by a user,for example. Note the explicit reference 702 to the “Patient” modelentity 506 ₁. As a result of this reference, the logic of the DAM 502,specifically the metadata of the Patient model entity 506 ₁, is appliedto convert the initial Abstract Query 700 into an effective AbstractQuery 704. In this case, “Patient ID” was added to the result fieldsspecified in the effective Abstract Query 704 because the “patient”model entity 506 ₁ defines “Patient id” as a required field with theprovision of a required attribute 610.

The augmentation of the effective Abstract Query 704 from an end-user'sperspective is described with reference to FIGS. 8-12, which show aseries of user interface screens. Referring first to FIG. 8, a screen800 is configured with a selection menu 802 from which a user selects aquery focus. Each of the available selections corresponds to one of thedefined model entities 506. Illustratively, the user selects “Patient”as the query focus and clicks the “Next” button 804, which causes theuser interface to display the next screen 900 shown in FIG. 9. That is,the user has elected to craft a query which invokes the “Patient” modelentity 506 ₁. The user then specifies various query conditions in aninput field 1002 as shown in FIG. 10. Clicking the “Next” button 1004causes the user interface to display the next screen 1100 shown in FIG.11. The screen 1100 includes a Result Fields input field 1102.Illustratively, the input field 1102 is primed with the “Patient ID”field. That is, the “Patient ID” field is automatically added to theResult Fields input field 1102 because the “Patient” model entity 506 ₁defines “Patient ID” as a required field with the provision of arequired attribute 610 (shown in FIG. 6). The user may then specifyadditional result fields as shown in FIG. 12. In an alternativeembodiment, the “Patient ID” is not added to the result fields of thequery until submitted for execution by the user.

Referring now to FIG. 13, one embodiment of a method 1300 illustratingthe result field augmentation of a query is described. The augmentationprocess begins with receipt of an initial abstract query 1304A (step1302), such as the initial Abstract Query 700 described with referenceto FIG. 7. An effective query 1304B (such as the effective AbstractQuery 704 described with reference to FIG. 7) is then set to the initialquery 1304A (step 1306). At this point, the composition of the effectiveabstract query 1304B is the same as the initial abstract query 1304A.The effective abstract query is then examined for a reference to a modelentity (step 1308). In the absence of such a reference, processing iscomplete and the method 1300 exits. If, however, the effective abstractquery 1304B includes a reference to a model entity the appropriate modelentity definition 506 is retrieved from the data abstraction model 502.For each required query field (indicated by the required attribute 610)in the model entity (loop entered at step 1312), the method 1300determines whether the required field is already specified as a resultfield in the initial abstract query 1304A (step 1314). If not, therequired field is added to the result fields of the effective abstractquery 1304B.

In another aspect, model entities establish a focal point within thedata environment that can be used to implement the appropriate logicneeded to correlate information that spans multiple entities (e.g.tables) in the underlying physical data repository. From this focalpoint, a direction to interpret relationships between tables can beestablished. For example, the physical entity relationshipsspecification 526 describes a 1-to-many relationship between thePatientInfo table 520 and the TestInfo table 521, since each patient canhave multiple lab test results. A model entity focused on the patiententity would establish a point of reference to correlate patientinformation with lab test results. For example, in the case of arelational database, the model entity for “patient” would be used todetermine optimal table join logic. Since each patient can have multiplelab test results, a query looking for patients with multiple testresults would join the lab test table multiple times to enable selectionof patients with all of the desired test results. However, a modelentity focused on lab tests would only join the patient informationtable once since the focus is on lab tests and the relationship in thedirection “lab test”-to-“patient information” is degree one (1).

The effect of a model entity on query construction can be illustratedwith respect to FIG. 14. An illustrative abstract query 1400 includes aplurality of query conditions 1402, result fields 1404 and a reference1406 to a model entity, in this case “Patient”. That is, the “Patient”model entity 506 ₁ is specified as the focal point of the query 1400.The query conditions 1402 include two conditions with respect to aGlucose Test, where the two conditions are logically ANDed together.Since the “Patient” entity is the focus, the query conditions 1402 areinterpreted to mean “find patients having both a glucose test value=5AND a glucose test value=10”. Further, the relationship defined in thephysical entity relationships specification 526 between the“PatientInfo” table 520 and the “TestInfo” table 521 is one-to-many,indicating that a patient can have more than one test result. Given thisinformation, it is determined that a physical query 1408 (illustrativelyan SQL query) corresponding to the abstract query 1400 will require twoinstances of the “TestInfo” table 521 in order to compare two testresults for the same patient. The two instances of the “TestInfo” table521 are identified as T2 and T3 in the selection clause of the physicalquery 1408. Further, the physical entity relationships specification 526is used to generate the necessary correlation logic 1410 between eachphysical entity involved in the query. In a relational model, thecorrelation logic is join logic specifying how tables are joined.

Referring now to FIG. 15, a physical query generation process 1500 isdescribed for generating a physical query based on abstract queryreference in a model entity. The process 1500 is initiated when acompleted abstract query is received (step 1502). For each abstractquery condition in the abstract query (step 1504), a series of steps isperformed. Specifically, for a given abstract query condition, theprocess 1500 determines whether more than one ANDed condition isspecified for the field of the given abstract query condition (step1506). If not, a physical query contribution is generated against asingle instance of the physical entity corresponding to the field of thegiven abstract query condition (step 1508). If, however, step 1506 isanswered affirmatively, the physical entity corresponding to the fieldfor the given abstract query condition is determined (step 1510). Inaddition, the physical entities corresponding to the specified modelentity are determined (step 1512). The physical entity relationshipsspecification 526 is then examined to determine whether a one-to-manyrelationship exists between any of the physical entities correspondingto the model entity and the physical entity for the field of the givenabstract query condition. If not, a physical query contribution isgenerated against a single instance of the physical entity correspondingto the field of the given abstract query condition (step 1508). If,however, step 1514 is answered affirmatively, a physical querycontribution is generated against another instance of the physicalentity corresponding to the field of the given abstract query condition(step 1516).

After having processed each abstract query condition, the result fieldscontribution for the query is generated (step 1518). Finally,correlation logic between each physical entity involved in the query isgenerated using the relationship metadata contained in the physicalentity relationships specification 526 (step 1520). The resultingphysical query can then be executed.

In still another aspect, model entities 506 can be used to represent aset of query result fields. By abstracting groups of logical fields(and, hence, physical fields) applications and users are able to dealwith higher level entities (e.g., a patient), without having tounderstand the details of what constitutes the entity.

An illustration of using model entities to represent a set of queryresult fields is described with reference to FIG. 16. An initialAbstract Query 1600 is shown with illustrative query conditions 1602 andresult fields 1604. In this example, the initial Abstract Query 1600includes a reference 1604 to the “Patient” model entity 506 ₁. As aresult of this reference 1604, steps are taken to expand the resultfields 1604 to include all of the logical fields defined for the“Patient” model entity 506 ₁, resulting in the effective Abstract Query1608.

A result fields augmentation process 1700 is described with reference toFIG. 17. For a given an initial abstract query 1704A (step 1702), acorresponding effective query 1704B is set (step 1706). The resultfields of the query 1704A are then examined to determine a reference toa model entity (step 1708). If no such reference is identified, theprocess 1700 is complete. If a model entity reference is present in thequery, the model entity definition 506 is retrieved (step 1710). Foreach required field in the model entity (step 1712), the process 1700determines whether the required field is in the specified result fieldsof the initial abstract query 1704A (step 1714). If not, the requiredfield is added to the result fields of the effective abstract query1704B (step 1716). At the conclusion of this processing for eachrequired field, the effective abstract query 1704B includes the fullcomplement of logical fields for the specified model entity definition506.

It should be noted that the individual aspects separately described withreference to FIGS. 13, 15 and 17 (and related figures) may be used incombination. For example, assume that the initial Abstract Query 1400shown in FIG. 14 does not include the “Patient id” field in the resultfields 1404. A first stage of processing may be performed according tothe method 1300 whereby the “Patient id” field is added to the resultfields 1404. A second stage of processing is then performed according tothe process 1500 to generate the physical query 1408. Persons skilled inthe art will recognize other process combinations which may beperformed.

Modification Operations Using Model Entities

Aspects of the invention are described above with reference to accessingdata for the purpose of returning results. In the case of SQL, these areSELECTION operations. However, modification operations are alsosupported, including well-known modification operations such as INSERT,DELETE and UPDATE and the like. Accordingly, the following describesembodiments extending and enhancing the functionality of the abstractframework described above to support modification operations using modelentities.

Since a model entity may span multiple physical entities (e.g., tables),multiple database operations may be needed to implement a modificationoperation. That is, embodiments are provided for modifying physical datavia a single logical operation spanning multiple statements (e.g.,multiple SQL statements) issued against the physical data. To this end,model entities define a minimal set of fields used to derive thecomplete set of fields involved in data insert and delete operations foran instance of the model entity. For example, patient information spanstwo tables (e.g., the “PatientInfo” table 520 and the “AddressInfo”table 521) in the relational data source 504 implementation shown inFIG. 5. To implement inserts and deletes, the model entity for patientidentifies at least one field in each table to serve as a “seed” indetermining the complete set of fields that are needed to insert a newpatient into the database, as well as the complete set of tables thatare involved to delete a patient from the database. Specifically, theseed fields are specified in insert portion 606 ₁ and delete portions608 ₁ of the model entity definition 506 ₁ for “Patient” in the DAM 502shown in FIG. 6. In the case of the insert portion 606 ₁, the seed fieldcorresponding to the “PatientInfo” table 520 is “Last Name” and the seedfield corresponding to the “AddressInfo” table 521 is “Street”. Eachmodel entity 506 defined in the DAM 502 may have a similar portionsspecifying seed fields.

Based on the seed fields, multiple physical operations are performedagainst the data repository to implement a single abstract operation.For inserting into a relational data source 504, for example, this wouldinvolve creation of multiple physical SQL INSERT statements for thetables involved. The application/user need only specify a model entity,which is then used to identify the corresponding physical entities andrelated logical fields involved in the modification operation. The modelentity may be selected from a drop-down menu of an HTML form, forexample. Further, deletes allow for conditions to be specified that canbe used to target the changes required in the physical data repository.

FIG. 18 shows a simplified view of the environment 500 and includes anillustrative abstract insert operation specification 1802 ₁ and a deleteoperation specification 1802 ₂ (collectively, abstract operationspecifications 1802) used to implement an insert operation and a deleteoperation, respectively, against the relational data source 504. Theabstract operation specifications 1802 are composed via the dataabstraction model 502 according to specifications provided by arequesting entity 512 (e.g., a user/application). In each case, theabstract operation specifications 1802 specify a seed value for eachaffected physical entity. The seed values are retrieved from theappropriate portion of the model entity 506 selected by the requestingentity 512. Based on the seed values, related logical fields aredetermined and made a part of the abstract operation specifications1802. Thus, as in the case of queries, the framework of the presentapplication will provide the requesting entity 512 with the relatedfields according to the specified model entity 506, rather thanrequiring that knowledge about a database schema at the applicationlevel or end user. Values may then be supplied for each of the fields,either from the requesting entity 512 (e.g., a user) or from some othersource such as the value generator 524.

Although in the present examples, each abstract operation includes twoseed fields, an abstract operation may also be implemented with only asingle seed field. For example, the seed field may be a primary keyhaving an associated foreign key. In this case, an abstract operationspecifying the seed field may affect the physical data on which theforeign key is defined. It should be noted that in some cases thisresult may not be desirable. That is, it may be undesirable to propagatechanges based on primary key/foreign key relationships. If propagationis desired, only one statement directed to modifying the tablecontaining the primary key is needed. The DBMS will handle modificationsto the related tables. In some instances the DBMS may not supportpropagation, in which case multiple statements are needed. Although notshown the data abstraction model may include an attribute specifyingwhether propagation is desired or not for a given logical field.

In addition to seed fields, the DAM defines other field types used toimplement modification operations. Generally, such fields may berequired or optional. “Required” means that the requesting entity mustsupply a value for the field because there is no suitable default value,no algorithm to generate a value and the field cannot be null. Requiredfields are defined by the required attribute 514, shown in FIG. 5. Anoptional field is one which does not require specification of a value bythe requesting entity. Optional fields include: 1) fields that can beassigned the value of NULL; 2) fields that have an algorithm that can beused to generate a value for that field (referred to herein as“generated fields”); and 3) fields that have a defined default value inthe DAM (referred to herein as “default fields”). Generated field valuesare generated by a value generator 524 (i.e., an algorithm). Generatedfields are defined by the generated attribute 516, shown in FIG. 5.Default values are used where no name/value pair was specified for aparticular field related to the entity defined by a seed field. Defaultfields are defined by the default attribute 518. Default values may bestatically defined or generated. As an example of a generated defaultvalue, the Test Date value in the illustrative abstract deletespecification 506 ₃ defaults to the current date. The requesting entity(e.g., user) may be given the option of supplying a different value.

As an example of required and optional fields, consider the logicalfields corresponding to the patient entity. It was noted above that thepatient entity is logically defined by the “Patient ID” logical fieldspecification 510 ₁, the “First Name” logical field specification 510 ₂and the “Last Name” logical field specification 510 ₃. The “First Name”logical field specification 510 ₂ and the “Last Name” logical fieldspecification 510 ₃ include the required attribute and are requiredfields. In contrast, the other logical fields defining the patiententity (i.e., birth date and gender) are optional.

Accordingly, inserts and updates to the data source 504 provide foridentification of the actual fields (i.e. columns) that are to bemodified along with the new value to be put in the data source. A set ofname/value pairs represents the fields/values within the dataabstraction model 502 that correspond to the physical fields/values tobe modified. The name represents the abstract name for the logical fieldthat is mapped via the data abstraction model 502 to its underlyingphysical representation. The value is the abstract value to be insertedor updated in the data source for that field. In one aspect, using anabstract data model (i.e., the data abstraction model 502) allows forautomatic conversion of abstract values to the correct physical valuesto be inserted into the database. For example, the data abstractionmodel 502 can be defined to use values such as “Male” and “Female” forgender when the underlying physical data repository may use values of“F” and “M” to represent those values, as illustrated by the patientinformation table 520, which contains a record having the value “F” inthe gender (gend) column. Input values for an insert operation takeadvantage of those abstract value specifications to provide furthercushion for changes to the underlying physical representation of notonly the structure of the underlying data repository, but also from thephysical form of the data contained within the data repository.

Some situations require special considerations. In many cases, a logicalfield may be physically represented in multiple fields in a physicaldata repository. One example would be the case in the relational datasource 504 where a column in one table was defined as a foreign key to acolumn in another database table. For example, a patient ID may be aprimary key within the patient information table 520 and may also bedefined as a foreign key within the test information table 522. Althoughthis is a typical example, an abstract relationship between two fieldsdoes not necessarily have to be enforced by a physical relationship(such as primary/foreign key) in the underlying data repository. Usingmetadata about the relationship between the two physical locations(i.e., relationship between column(s) in a first table to column(s) in asecond table), a single field within the abstract data representationcan be used to handle both physical locations for the field. Theapplication is shielded from the knowledge of the various places aparticular value is used within the database schema.

Special considerations must be taken into account when these relatedfields are included on an insert or delete operation. When performing aninsert operation, the runtime/DAM logic must recognize the variousphysical representations for the single abstract data field. The correctphysical representation must be used based on the focus item of theinsert operation. For example, if the patient identifier was representedas column “ID” in the patient information table 520 and as column “PID”in the test information table 522, the correct column name must beidentified based on the table defined for the insert operation by thefocus item. Additionally, these additional forms of the physicalrepresentation must be taken into account when determining defaultvalues and required values for the insert operation. For example, if thefocus item identified that the underlying physical table for theoperation was the test information table 522, the runtime/DAM logic mustrecognize that the abstract patient ID field (“PID”) must be consideredwhen looking for default and required values. That is, a new patient IDcannot be generated.

Additional considerations must be given to delete operations whendealing with abstract fields that represent multiple locations in thephysical data repository to ensure that data integrity is maintained.The underlying data repository may enforce additional restrictions onthese types of fields. Relational databases provide aspects such asrestricting updates or deletes to columns defined with a primarykey/foreign key relationship or cascading those updates and deletesthrough the foreign key tables. That is, a delete against a primarytable such as the patient information table 520 could be set up toindicate that the delete should cascade and delete the correspondingrows from the test information table 522 based on the primarykey/foreign key relationship based on patient ID. Using an abstractrepresentation of the data repository, the implementation can choosewhether to restrict these operations or attempt to propagate the changesthrough the various physical entities based on the definition of therelationships for the abstract field.

Since a modification based on specification of a model entity mayinvolve multiple physical operations, the sequence in which theoperations should be performed must also be considered. In the currentdata mining applications based on SQL, for example, the application isrequired to have the knowledge of order dependencies between operations.An aspect of the present invention decouples this knowledge from theapplication. In one embodiment, order dependencies between operationsare specified in the physical entity relationships specification 526.

Referring now to FIG. 19, a method 1900 illustrates the interactionbetween requesting entity 512 and the data abstraction model 502 in thecase of composing an abstract insert specification. For purposes ofillustration it will be assumed that the requesting entity 512 isrepresentative of the application 140 (FIG. 1), which receives inputfrom a user via a user interface (e.g. the browser program 122 FIG. 1).Initially, the user selects a model entity (step 1902). The seed fieldsfor the selected model entity are then determined and the abstractinsert specification 1802 ₁ is updated with the seed field (step 1906).Once each of the seed fields has been determined, the requesting entity512 issues a request for the required and optional fields according tothe specified seed fields (step 1908). The data abstraction model 502 isinvoked to determine required and optional fields for the insertoperation (step 1910). An illustrative representation of the processingoccurring at step 1910 is described below with reference to FIGS. 20A-B.Having made the determination at step 1910 the abstract insertspecification 1802 ₁ is initialized with the required and optionalfields (step 1912). The required and optional fields are then returnedto the requesting entity (step 1914), which prompts the user to providevalues for each of the fields (step 1916). Well-known techniques in theart of user interfaces may be used to identify and distinguish for theuser required fields and optional fields. For example, required fieldsmay be highlighted in red, marked with an asterisk, or include aparenthetical comment indicating that the field is required. In analternative embodiment, the application 140 itself may provide all orsome of the values. Once values for at least each of the required fields(and any optional fields) has been specified (step 1918), the abstractinsert specification 1802 ₁ is populated with the specified values (step1920).

Referring now to FIGS. 20A-B, one embodiment of step 1910 fordetermining required and optional fields is shown. After accessing theabstract insert specification 1802 ₁ to retrieve the seed fields (step2002) specified by the requesting entity 512, the appropriate logicalfield specification of the data abstraction model 502 is referred to inorder to determine the physical entities (e.g., tables in the relationaldata source 504 shown in FIG. 5) corresponding to the seed fields (step2004). In the case of an insert operation, for each identified physicalentity, the data repository abstraction is used to determine otherlogical fields associated with the same physical entity (steps 2006 and2008). A loop is then entered (at step 2010) for each of the determinedrelated logical fields that define a particular physical entityreferenced by a seed field. That is, a series of steps is performed foreach of the related logical fields of each physical entity. For a givenlogical field of a given physical entity, a determination is made as towhether a key relationship for the given logical field has already beenprocessed (step 2012). For the first iteration of the loop entered atstep 2006 the determination made at step 2012 is answered in thenegative. During subsequent iterations, step 2012 ensures that once avalue has been specified for a field, a subsequent and conflicting valuewill not be specified. Processing is then performed to determine whetherthe field is a required field (at step 2020), whether the field is adefault value field (step 2026), or whether the field is a generatedvalue field (step 2034). The field type is determined according to theattribute (i.e., the required attribute 514, the generate attribute 516or the default attribute 518) present in the logical field specificationfor the current field being processed by the loop. If the field isrequired (step 2020), the field is added (step 2022) to a required fieldlist 2024. In the case of a default attribute (step 2026), the fieldvalue is initialized with a default value (step 2028). Where the logicalfield specification includes a generate attribute 518 (step 2034), thefield is initialized with a generated value (step 2036). In the case ofboth generated values and default values, the corresponding fields areadded (step 2030) to an optional fields list 2032. If the field is notdefined as any one of required, default or generated, then the field isinitialized with a NULL value (step 2038) and then added (step 2030) tothe optional field list 2032.

Returning to step 2012, if the current field being processed is in a keyrelationship (e.g., primary key/foreign key relationship) with anotherfield which has already been processed, then the value for the currentfield is set to the value of the previously processed related field(step 2014). The current field is then added to an implicit field list2018 (step 2016). Accordingly, implicit fields are created with multiplephysical entities are involved in the abstract operation and thoseentities have key relationships. In this case, only one field and onevalue is exposed through the interface. The other field in the pair ofkey fields is considered implicit; it does not have to be specified aspart of the abstract insert and will take on the same value as thecorresponding key in the pair. The implicit fields are not exposed tothe requesting entity, but are accounted for when the abstract insert isconverted into a concrete (i.e., executable) insert statement, as willbe described below with reference to FIG. 21.

Once each identified related field is processed according to the loopentered at step 2010, the processing is repeated for the next entity(step 2006). Once each entity has been processed, the processing todetermine required and optional fields is complete. Accordingly, theabstract insert specification 1802 ₁ is updated according to therequired fields list 2014 and optional fields list 2022 (step 1912), andthe required fields and optional fields are then provided to therequesting entity 512 (step 1914), as shown in FIG. 19.

Having composed the abstract insert specification 1802 ₁, the insertoperation may be executed. FIG. 21 shows one embodiment of a method 2100for executing the insert operation according to the abstract insertspecification 1802 ₁. Generally, upon submission of a request to executethe insert from the requesting entity 512, the run-time component 150(described above with reference to FIG. 1) is invoked convert theabstract insert specification 1802 ₁ to a physical insert operation. Thephysical insert operation is then executed.

Conversion of the abstract insert specification 1802 ₁ to a physicalinsert operation is initiated by grouping fields (from the implicitfield list 2018, the required field list 2024, and the optional fieldlist 2032) according to their respective physical entities (2104). Inparticular, the run-time component 150 then enters a loop (step 2106)for each physical entity and a sub-loop (step 2108) for each logicalfield of a given physical entity. For a given logical field, thephysical location of the field is determined from the data abstractionmodel 502 (step 2110). A physical location list 2114 is then updatedwith the determined physical location (step 2112). In some cases, thelogical field may have an internal value (determined at step 2116). Thatis, the value of the logical field may be different from the value forthe physical field. For example, the logical field name may be “Male”while the physical field name is “M”. In this case, the value must bemade consistent with physical value. This is done by updating a valuelist 2122 with the internal value (step 2118). If the field values arenot different (i.e., step 2116 is answered negatively), the value list2122 is updated with the given value for the physical field (step 2120).

Once the processing for the loop entered at step 2108 has been performedfor each logical field in the abstract insert specification 1802 ₁, fora given physical entity, a physical insert statement is built from thelocation list 2114 and the value list 2122 (step 2124). The physicalinsert statement is then added to an insert statement list 2122 (step2126). The foregoing processing is then repeated successively for eachentity (step 2106). Subsequently, an ordering algorithm is performed onthe insert statement list 2128 (step 2130). One embodiment of theordering algorithms is described with reference to FIG. 22. The physicalinsert operation is then executed (step 2132).

Referring now to FIG. 22, an embodiment of the ordering algorithmperformed at step 2130 is described. Initially, a “sorted flag” is setto False (step 2202). A series of steps are then performed for eachinsert statement in the insert statement list 2128 until the “sortedflag” is set to True (steps 2206, 2208 and 2210). Specifically, for agiven insert statement in the insert statement list 2128 (beginning withthe first insert statement in the list), the corresponding entity isdetermined (step 2212). Then, the relationship between the correspondingentity of the given insert statement and each related entity of theremaining insert statements in the insert statement list 2128 isdetermined (step 2214 and 2216). Specifically, the run-time component150 determines (with respect to the physical entity relationshipsspecification 526) whether the entity of the given insert statement is asecondary entity with respect to a primary related entity of anotherinsert statement (step 2216). If so, the given insert statement is movedto a position after the insert statement of the related entity (step2218). This process is repeated until the insert statement list 2128 canbe traversed without encountering a current entity which is secondarywith respect to an entity of a subsequent statement in the insertstatement list 2128. At this point, the physical insert statements inthe insert statement list 2128 are ordered according to the hierarchicalrelationship specified in the physical entity relationshipsspecification 526. This process ensures that a primary entity containinga primary key of a primary/foreign key pair is inserted into first,before the secondary entity (containing the foreign key) is modified.

As noted above, aspects of the invention may “guide” the requestingentity 512 (i.e., the application 140) through the process of buildingan abstract modification operation. This aspect can be illustrated foran insert operation with reference to FIGS. 23-26 where HTML forms 160(shown in FIG. 1) are intelligently populated to indicatecharacteristics of various fields. Referring first to FIG. 23, a userinterface screen 2300 is shown which may be displayed when a user electscreate an abstract insert. The screen 2300 includes a menu 2302 ofavailable entities which may be inserted into. The entity selected bythe user from the menu 2302 are displayed in a “Selected Entity” field2304, as shown in FIG. 24. In this example, the user has selected“Patient”. Upon making the desired selections, the user clicks the“Next” button 2306 to submit the selections and proceed to the nextscreen 2500 shown in FIG. 25. The screen 2500 is formatted with aplurality of input fields 2502A-I which are selected according to theentity specified by the user in the “Selected Entity” field 2304. Thatis, the fields defined for the selected entity (i.e., “Last Name” and“State” in this example) are used as seed fields in determining whichfields to display in the screen 2500. In this case, “Last Name” is alogical field 510 ₃ corresponding to the “PatientInfo” table 520 forwhich the “First Name” logical field 510 ₂, “Birth Date” logical field510 ₄ and “Gender” logical field 510 ₆ are also specified as relatedlogical fields. As such, each of these logical fields is displayed as aninput field (input fields 2502C, 2502E and 2502F, respectively) in thescreen 2500. Similarly, the seed field “State” is used to identify thecorresponding physical entity (i.e., AddressInfo table 521) and itsrelated logical fields. Further, required fields (as defined by thepresence of a required attribute 514 in the DAM 502) are marked with anasterisk (*). In this case, the input fields 2502A, 2502B and 2502C aremarked as required fields. Further, generated in default fields areprimed with the appropriate values. In the present example, the “PatientID” input field 2502D is primed with a generated value. A default valuesnot shown because none of the input fields 2502 correspond logical fieldspecifications having a default attribute 518.

The user is then free to enter the desired values. An illustration ofthe input fields 2502 after having been populated with values is shownin FIG. 26. In this case, the user provided values for the requiredfields, and also elected to provide values for the optional fields.

Referring now to FIG. 27 an abstract delete method 2700 is described.Generally, the method 2700 describes the interaction between therequesting entity 512 and the data repository abstraction 502, whichimplements the abstract delete. As in each of the previous abstractmodification operations, the abstract delete requires composing anabstract specification. To this end, the requesting entity 512 specifiesa model entity to delete (step 2702). The seed fields for the selectedmodel entity are then determined (step 2704) which the data abstractionmodel 502 uses to create/update abstract delete logic of the abstractdelete specification 1802 ₂ (step 2706). The requesting entity 512 thenprovides selection conditions for selection of data to delete (step2708). The selection conditions are added to the selection portion ofthe abstract delete specification 1802 ₂ (step 2710).

The abstract delete specification is then used by the run-time component150 to generate an executable physical delete specification. Oneconversion method 2800 for converting the abstract delete to a physicaldelete, is described with reference to FIG. 28. The conversion processis initiated when the requesting entity 512 submits a request to executethe delete operation. The run-time component 150 first groups thespecified seed fields according to their respective physical entity(step 2802). That is, the run-time component 150 uses the seed value(specified by the requesting entity 512 at step 2702) and the dataabstraction model 502 to locate the physical entity to delete from. Inparticular, the logical field specification of the data abstractionmodel 502 corresponding to the seed field is identified. The identifiedlogical field specification provides the necessary logic (i.e., theappropriate access method) to access the physical entity to delete from.For each physical entity (step 2804), the run-time component 150generates selection logic according to the selection conditionsspecified in the abstract delete specification 2402 ₂ (step 2806). Usingthe determined physical entity and the generated selection logic, therun-time component 150 builds a physical delete statement (step 2808)which is added to a delete statement list 2812 (step 2810). Thestatements in the delete statement list 2812 are then ordered (step2814) and executed (step 2816).

One embodiment for generating the selection logic at step 2806 of themethod 2800 is shown in FIG. 29. It is noted that step 2806substantially involves performing steps 306, 308, 310 and 312 of FIG. 3.Accordingly, for each selection criterion (step 2902), the specifiedfield definition is retrieved from the abstraction component 502 (step2904). A concrete/physical selection contribution is built (step 2906)and then added to the selection portion of the update statement (step2908). The logic for building the concrete/physical selectioncontribution is substantially the same as was described for queries withrespect to FIG. 4 and, therefore, will not be described again in detailhere.

One embodiment of the ordering performed at step 2814 is described withreference to FIG. 30. Initially, a “sorted flag” is set to False (step3002). A series of steps are then performed for each delete statement inthe delete statement list 2812 until the “sorted flag” is set to True(steps 3006, 3008 and 3010). Specifically, for a given delete statementin the delete statement list 2812 (beginning with the first deletestatement in the list), the corresponding entity is determined (step3012). Then, the relationship between the corresponding entity of thegiven insert statement and each related entity of the remaining deletestatements in the delete statement list 2812 is determined (step 3014and 3016). Specifically, the run-time component 150 determines (withrespect to the physical entity relationships specification 526) whetherthe entity of the given delete statement is a primary entity withrespect to a secondary related entity of another delete statement (step3016). If so, the given delete statement is moved to a position afterthe delete statement of the related entity (step 3018). This process isrepeated until the delete statement list 2812 can be traversed withoutencountering a current entity which is primary with respect to an entityof a subsequent statement in the delete statement list 2812. At thispoint, the physical delete statements in the delete statement list 2812are ordered according to the interrelationship specified in the physicalentity relationships specification 526. This process ensures that aprimary entity containing a primary key of a primary/foreign key pair isdeleted last, after the secondary entity (containing the foreign key) isdeleted.

It should be noted that the embodiments described above are merelyillustrative and not exclusive. Persons skilled in the art willrecognize other embodiments within the scope of the invention. Forexample, the foregoing describes an embodiment in which orderdependencies are defined as part of the DAM 148 (i.e., orderdependencies are defined in the physical entity relationshipsspecification 526). Thus, changes in order dependencies require changesin the abstract data representation, but allow the application to beused without changes. An alternative embodiment provides for a lessrigid definition of order dependencies by allowing for a higher degreeof automation in the determination dependencies. That is, given thephysical entity relationships specification 526 defined in an abstractdata representation, the sequencing of operations could be determineddynamically by applying a rule set such as the following: (i) insertoperations involving a key field need to insert into the primary entitybefore any related entities; (ii) update operations involving a keyfield could be restricted or automatically propogated from the primaryentity first followed by all related entities; (iii) delete operationsinvolving a row that includes a key field could be restricted orautomatically propogated from the secondary entities to the primaryentity; and (iv) operations for completely unrelated entities would beexecuted in any order.

In still another embodiment, it is contemplated that the database ischecked for referential integrity cascade operations. In this case, thedatabase itself handles some of the work and allows DAM 148 toeffectively ‘ignore’ those low level operations, and only perform thehigh level ones. As such, this invention can ‘patch’ referentialintegrity holes in legacy databases that may no longer be fixable at thedatabase layer because of assumptions built into legacy applicationsthat use the database.

Fee Schedules

In one embodiment, a data abstraction model is configured with feeschedules for one or more logical field specifications, individually orcollectively. In general, a fee schedule indicates a cost of involving aparticular logical field(s) in an abstract operation, such as a query,insert, delete or update. It is contemplated that a fee structure may beimposed on a single logical field specification, a category of logicalfields and/or on model entities. In each case, a corresponding feestructure is implemented as metadata of the data abstraction model. Forexample, referring to FIG. 31 a simplified representation of FIG. 5 isshown, in which the logical field specification 510 ₁₂ for Glucose Testhas an associated fee schedule 530A. For simplicity, only one logicalfield specification 510 is shown having a fee schedule; however, anynumber of logical field specifications of the DAM 502 may include feeschedules. A category configured with a fee schedule 530B is representedby the Demographic category 508 ₁. Again, only one category is shownhaving a fee schedule, for simplicity. Finally, each of the modelentities 506 ₁₋₃ is shown with an associated fee schedule 530C-E,respectively.

Embodiments of the fee schedules 530A-E can be seen in FIG. 32 whichshows a representative detailed view of the DAM 502 shown in FIG. 31.For example, the fee schedule 530B of the Demographic category 508 ₁includes individually defined fees for queries, inserts and updates. Foreach operation the fee may be per request (as illustrated by the queryfee and the update fee), or per item (as illustrated by the insert fee).Similarly, the Glucose Test field specification 510 ₁₂ includes a peritem query fee schedule 530A (which in this case is one attribute).

Referring now to FIG. 33, embodiment of the model entity specifications602 ₁₋₂ is shown. Other elements of the model entities specifications602 ₁₋₂ were described above with respect to FIG. 6, and are notrepeated here. In the case of model entities, the attributes of therespective fee schedules may be distributed over the portions for eachoperation. Thus, the “Patient” model entity 506 ₁ includes a per requestquery fee attribute in the query portion 604 ₁ of the entity and a peritem insert fee attribute in the insert portion 604 ₂ of the entity, andthe “Test” model entity 506 ₂ includes a per item query fee attribute inthe query portion 604 ₂ of the entity. For brevity, the “Account” modelentity 506 ₃ is not shown.

The embodiments described with respect to FIGS. 31-33 illustrate thatfees may be based on various levels of granularity of data. Theseembodiments are merely illustrative and persons skilled in the art willrecognize other embodiments within the scope of the invention. Forexample, fees could be made to vary with volume such that (i) queriesreturning high volumes of results incur a penalty (which may bedesirable to deter users from draining the performance resources of asystem); (ii) or, queries returning high volumes of results receive adiscount (which may be useful for a data provider to establish acompetitive advantage and/or increase profits by encouraging increaseduse).

Embodiments of fee calculation algorithms for various abstractoperations are shown in FIGS. 34-35. For convenience and simplicity, thefee calculations for queries and inserts are described together withrespect to FIG. 34. Fee calculations for updates are describedseparately with respect FIG. 35. In each case, the fee calculation isimplemented by the fee calculator 151 shown in FIG. 1. Note that atleast some of the operations of the fee calculator 151 could beperformed as part of the abstract operation runtime, or could beimplemented as an “after the fact” process, using transaction and auditlogs to compute the applicable charges sometime after execution of thetransaction. In this case, it is contemplated that the user may bewarned (by operation of the fee calculator 151) that fees apply to agiven transaction, prior to executing the transaction.

Referring now to FIG. 34, one embodiment of a fee calculation algorithm3400 for queries and inserts is shown. The fee calculation algorithm3400 is initiated (at step 3402) for a given abstract operation. The feecalculator 151 then determines whether the abstract operation includes areference to a model entity (step 3404). If so, the fee calculator 151determines (at step 3406) whether the reference model entity defines afee for the particular operation (i.e., a query fee or an insert fee).If so, the fee calculator 151 determines (at step 3408) whether the feeis a per item fee. If so, a “per item fee list” 3412 is updated (at step3410). Otherwise, the fee is assumed to be a per request fee, in whichcase a “per request fee list” 3416 is updated (step 3414). In oneembodiment, the per item fee list 3412 includes a reference to each itemfor which a fee applies, as well as the corresponding fee. In contrast,the per request fee list 3416 need only include a record of the fee foreach request made with respect to the given field. In either case, thealgorithm 3400 then enters a loop (at step 3418) for each fieldspecified in the given abstract operation. The loop is also entered fromsteps 3404 and 3406 if either step is answered in the negative.

For a given field of the abstract operation, the algorithm 3400determines (at step 3420) whether an operation fee (i.e., query fee orinsert fee) is defined for the field. If not, processing proceeds tostep 3428 described below. Otherwise, the fee calculator 151 determines(at step 3422) whether the operation fee is per item. If so, the feecalculator 151 updates the per item fee list 3412 (at step 3426).Otherwise, the per request fee list 3416 is updated (at step 3424).

The fee calculator 151 then identifies (at step 3428) the parentcategory for the given field being processed. A loop is then entered (atstep 3430) for each category containing the given field being processed(i.e., the parent category, grandparent, great grandparent, etc.). For agiven category, the fee calculator 151 determines (at step 3432) whetheran operation fee is defined for the category. For any given categoryhaving a defined operation fee, the fee calculator 151 then determines(at step 3434) whether the fee is a per item fee. If so, the per itemfee list 3412 is updated (step 3436); otherwise, the per request feelist 3416 is updated (step 3438). After each category for a given parentcategory has been processed, the algorithm 3400 returns to step 3418 tobegin processing the next field in the abstract operation. Once eachfield of the abstract operation has been processed in the foregoingmanner, the total fee for the abstract operation can be calculated basedon the information contained in the per item fee list 3412 and the perrequest fee list 3416.

In one embodiment, the fee calculator 151 first initializes a total feeto zero (at step 3440). The operation is then executed (at step 3442).In this regard it is contemplated that the fee calculator 151 is notresponsible for executing the operation, and step 3442 is shown merelyfor convenience of explanation. Before, during or after execution, thefee calculator 151 sums (at step 3444) the per request fees (based onthe information in the per request fee list 3416), and adds (at step3446) the sum to the total fee. The fee calculator 151 then determines(step 3444) the number (N) of query results (in the case where theoperation is a query), or the number of items (in the case where theoperation is an insert). For each per item fee (F), the fee calculator151 calculates the product of N and F, and adds the product to the totalfee (steps 3450 and 3452).

Referring now to FIG. 35, one embodiment of a fee calculation algorithm3500 (performed by the fee calculator 151) for update operations isdescribed. The algorithm 3500 is initiated for a given abstract updateoperation (at step 3502). The fee check letter 151 then enters a loop(step 3504) for each field in update. For a given field, the feecalculator 151 determines (step 3506) whether the update fee is definedfor the field. If so, the fee calculator 151 determines (step 3508)whether the update fee is per item. If so, the per item fee list 3412 isupdated (at step 3512). Otherwise, the fee calculator 151 updates theper request fee list 3416 (at step 3560).

The fee calculator 151 then identifies (at step 3514) the parentcategory for the given field being processed. A loop is then entered (atstep 3516) for each category containing the given field being processed(i.e., the parent category and ancestor category for that parent). For agiven category, the fee calculator 151 determines (at step 3516) whetheran update fee is defined for the category. For any given category havinga defined update fee, the fee calculator 151 then determines (at step3520) whether the fee is a per item fee. If so, the per item fee list3412 is updated (step 3522); otherwise, the per request fee list 3416 isupdated (step 3524). After each category for a given parent category hasbeen processed, the algorithm 3500 returns to step 3516 to beginprocessing the next field in the abstract update operation.

Once each field of the abstract update operation has been processed inthe foregoing manner, the fee calculator 151 determines (at step 3526)whether the given field is referenced in a model entity. If so, the feecalculator 151 determines (at step 3528) whether the reference modelentity defines a fee for update operations. If so, the fee calculator151 determines (at step 3530) whether the fee is a per item fee. If so,the per item fee list 3412 is updated (at step 3532). Otherwise, the feeis a per request fee, in which case a per request fee list 3416 isupdated (step 3534).

Once each field involved in the update operation has been processed, thetotal fee for the abstract operation can be calculated based on theinformation contained in the per item fee list 3412 and the per requestfee list 3416. In one embodiment, the fee calculator 151 firstinitializes a total fee to zero (at step 3540). The operation is thenexecuted (at step 3542). In this regard it is contemplated that the feecalculator 151 is not responsible for bexecuting the operation, and step3542 is shown merely for convenience of explanation. Before, during orafter execution, the fee calculator 151 sums (at step 3544) the perrequest fees (based on the information in the per request fee list3516), and adds (at step 3546) the sum to the total fee. The feecalculator 151 then determines (step 3544) the number (N) of itemsupdated. For each per item fee (F), the fee calculator 151 calculatesthe product of N and F, and adds the product to the total fee (steps3550 and 3552).

One embodiment for applying a fee-based model is illustrated withreference to FIGS. 36-40, which show user interface screens (e.g., ofthe browser program 122 shown in FIG. 1) for creating an abstract query.Persons skilled in the art will recognize that similar screens may beused for INSERT and UPDATE operations.

Referring first to FIG. 36, a user interface screen 3600 is shown havinga model entity selection list 3602. A representation is provided in thelist 3602 for each of the three model entities defined by the DAM 502shown in FIG. 31 (i.e., Account, Patient and Test). The screen 3600 alsoincludes any “Per Request Fee” field 3604 and a “Per Item Fee” field3606. The fields 3604, 3606 display a running total of fees generatedfor the abstract query being created by the user. Accordingly, thefields 3604, 3606 are initially empty, or indicate a zero dollar amount.A user then selects one of the model entities from the list 3602 andclicks the Next button 3608, whereby the user is presented with the userinterface screen 3700 shown in FIG. 37. For purposes of illustration, itis assumed that the user selects the Patient model entity from the list3602. Accordingly, the “Per Request Fee” field 3604 now displays a onedollar ($1.00) fee. The one dollar fee is calculated with reference tothe model entity specification 525 shown in FIG. 33, wherein the queryportion 604 ₁ of the Patient model entity 506 ₁ defines a one dollarfee, per request. The screen 3700 also includes an input field 3702 inwhich the user specifies the desired query conditions by clicking on theADD button 3707, which invokes a condition selection menu (not shown).The user then clicks the Next button 3608. Illustrative query conditionsare shown in FIG. 38. In the present example the user's query includesthe logical field Glucose Test, which has been associated fee of $0.50per item (as shown by the fee schedule 530A of FIG. 32). Accordingly,the “Per Item Fee” field of 3606 displays the $0.50 fee. If the queryincludes other logical fields having associated per item fees, thenadditional “Per Item Fee” fields may be provided in the interface 3700.Upon specifying the desired query conditions the user clicks the Nextbutton 3608 and is then presented with the user interface screen 3900shown in FIG. 39. The user interface screen 3900 includes an input field3902 for displaying the result fields to be returned by the query. Theinput field 3902 displays any required fields defined for the selectedmodel entity, which for the selected Patient model entity includes“Patient ID”. The input field 3902 also displays any user-selectedresult fields, which, in one embodiment, are added by clicking an ADDbutton 3904 to invoke a result fields selection menu (not shown). Inthis example, the user-specified result fields include Gender, GlucoseTest and Age as shown in FIG. 40. For each result fields specified, thefee calculator 151 determines whether additional fees apply. In thepresent example, no additional fees apply for the specified resultfields. Once the desired abstract query is completed, the user clicksthe Finish button 3616, whereby the query is executed and the resultsare returned. An illustrative results screen 4100 is shown in FIG. 41. A“Total Fee” field 4102 displays the total calculated fee for the query,in this example $4.00. The $4.00 is the sum of the $2.00 per request feeand a $2.00 for 4 results involving the Glucose Test field at $0.50 each(4*$0.50=$2.00).

Once the total fee for an operation is calculated, the fee may bedisplayed to the user. A variety of payment models may be applied tocollect payment from users. For example, in one embodiment the user maybe a subscriber with an account maintained by a data provider. Aftereach transaction, or after the user logs off, the total fee may beautomatically charged to the user's account. In another embodiment, theoperations may be performed on computers under the control of a businessentity i.e., computers at a store which provides network access forusers. In this case, users may be charged prior to leaving the store.

Accordingly, embodiments described herein provide a metadata-based modelfor establishing a usage fee for individual data items or collections ofdata, whereby the fees associated for one set of data can differ fromthe fees established for other information within the same datawarehouse or federated data environment. In addition to variation in feebased on the information accessed, the proposed fee model also takesinto account the type of operation performed (e.g., data retrieval, datainsertion or data update). This model allows for a different feeschedule for storage of new information than the schedule used forretrieval of existing information. A fee calculator takes into accountthe transactions performed by a requesting entity and the fee schedulesin place for information accessed to arrive at a net charge for eachtransaction against the data repository. In one embodiment, thisapproach allows for both high value and low value information to bemanaged within the same IT infrastructure, using the same data updateand access applications for each while establishing different chargesbased on the value of information accessed and or level of servicesprovided for information stored.

In various embodiments, numerous advantages may be provided. In somecases, these advantages may be substantial improvements over the priorart. Some of these advantages are now described (and others have beenmentioned above) with reference to specific IT contexts. However,whether or not an embodiment achieves an advantage, and whether or notsuch an advantage may be considered a substantial improvement, is notlimiting of the invention. Therefore, the advantages and contextsdescribed below do not define or limit the invention, which is limitedonly by the claims that follow.

In one embodiment a medical research database contains demographicinformation and associated gene expression data for each subject. Thedatabase manager would like to charge a premium for use of geneexpression data which involves a more time consuming and expensiveprocess to derive. The logical fields associated with gene expressionresults could have specific fees established that would allow forrecovery of cost (and profit) driven by the value of this information toother parties.

In another embodiment a medical records service provider who managesstorage of medical record information for multiple institutions, wouldlike to charge a premium for storage of information on new patientssince the addition of new patients requires a flow of activity toestablish the level of access the patient wishes to provide to theirpersonal information. The ability to establish a specific fee structurebased on the “Patient” model entity and, more specifically, on insertoperations performed for this entity allows distinction in the fees forthis type of requests versus other requests that have fewer associatedservices provided (like updating of the patient's street address).

In another embodiment, a service provider would like to establish anaccess fee schedule for a collection of fields that provide similarvalue. The ability to establish fees based on a logical group orcategory of fields makes this possible.

Some of the foregoing embodiments describe fee-based data access withreference to a data abstraction model. However, embodiments of theinvention are not limited to fee arrangements implemented in a dataabstraction model. Instead, any fee arrangement which provides for feesbased on the particular information being accessed and/or the nature ofthe operation to be performed on the information (query, insert andupdate) is contemplated. Thus, for example, the fee metadata of theabove-described data abstraction models may also represent fee schedulesfor physical fields (e.g., the physical fields of the database 504 shownin FIG. 5), directly (i.e., not logically described by an abstractionmodel). For example, a fee table in a database is contemplated in whichthe fee table defines a fee schedule for requests to access or modifyentities (tables) or items within an entity (column within a table).This fee schedule could also be defined to be sensitive to the type ofoperation performed and could indicate whether the fee was a per requestor per item fee. For example, the following table could be used as a feeschedule based on a physical, relational model. Considering the TestEntity for purposes of illustration, this fee schedule would result in a$0.50 per item fee for information returned from the test table and anadditional $0.50 per item fee for queries returning data from theglucose column.

Entity Item Operation Per Request Fee Per Item Fee DemoGraphic Query$1.00 $0.00 DemoGraphic Insert $0.00 $2.50 DemoGraphic Update $0.00$0.50 Test Query $0.00 $0.50 Test Glucose Query $0.00 $0.50

While the foregoing is directed to embodiments of the present invention,other and further embodiments of the invention may be devised withoutdeparting from the basic scope thereof, and the scope thereof isdetermined by the claims that follow.

What is claimed is:
 1. A computer program product to construct abstractqueries defined by a plurality of logical fields which map to aplurality of physical entities of physical data having a particularphysical data representation in a database, the computer program productcomprising: a computer-readable storage medium having computer-readableprogram code embodied therewith, the computer-readable program codecomprising: computer-readable program code configured to receive userinput via a user interface, the input comprising a reference to a modelentity definition comprising: (i) two or more logical fields eachcorresponding to a separate physical entity; and (ii) a fee schedule foraccessing physical entities based on the model entity definition;computer-readable program code configured to, based on the model entitydefinition, selectively add at least one of the two or more logicalfields to an abstract query; computer-readable program code configuredto receive a plurality of abstract query contributions for the abstractquery, wherein the plurality of abstract query contributions are definedby selected logical fields and a corresponding value for each of theselected logical fields; computer-readable program code configured toreceive a plurality of result fields for the abstract query, wherein theplurality of result fields is defined by selected logical fields;computer-readable program code configured to convert the abstract queryinto a physical query consistent with the particular physical datarepresentation of the data; computer-readable program code configured toexecute the physical query; and computer-readable program codeconfigured to calculate, on the basis of the fee schedule, a fee tocharge for execution of the physical query.
 2. The computer programproduct of claim 1, wherein each of the plurality of physical entitiesis a table in a database.
 3. The computer program product of claim 1,wherein selectively adding the at least one of the two or more logicalfields comprises: determining whether the at least one logical field isa required field as specified by the model entity definition; and if so,adding the at least one logical field to the abstract query.
 4. Thecomputer program product of claim 1, wherein a per request fee isdefined for a first one of the two or more logical fields and a perresult fee is defined for a second one of the two or more logical fieldsand wherein calculating the fee comprises: (i) calculating a product ofthe per result fee and a number of results for the second one of the twoor more logical fields; and (ii) summing the product and the per requestfee.
 5. The computer program product of claim 1, wherein converting theabstract query into the physical query comprises mapping each of thelogical fields of the abstract query to respective physical entities ofthe physical data.
 6. A computer, comprising: a memory containing aprogram; one or more processors which, when executing the program,performs an operation to construct abstract queries defined by aplurality of logical fields which map to a plurality of physicalentities of physical data having a particular physical datarepresentation in a database, the operation comprising: receiving userinput via a user interface, the input comprising a reference to a modelentity definition comprising: (i) two or more logical fields eachcorresponding to a separate physical entity; and (ii) a fee schedule foraccessing physical entities based on the model entity definition; basedon the model entity definition, selectively adding at least one of thetwo or more logical fields to an abstract query; receiving a pluralityof abstract query contributions for the abstract query, wherein theplurality of abstract query contributions are defined by selectedlogical fields and a corresponding value for each of the selectedlogical fields; receiving a plurality of result fields for the abstractquery, wherein the plurality of result fields is defined by selectedlogical fields; converting the abstract query into a physical queryconsistent with the particular physical data representation of the data;executing the physical query; and calculating, on the basis of the feeschedule, a fee to charge for execution of the physical query.
 7. Thecomputer of claim 6, wherein each of the plurality of physical entitiesis a table in a database.
 8. The computer of claim 6, whereinselectively adding the at least one of the two or more logical fieldscomprises: determining whether the at least one logical field is arequired field as specified by the model entity definition; and if so,adding the at least one logical field to the abstract query.
 9. Thecomputer of claim 6, wherein a per request fee is defined for a firstone of the two or more logical fields and a per result fee is definedfor a second one of the two or more logical fields and whereincalculating the fee comprises: (i) calculating a product of the perresult fee and a number of results for the second one of the two or morelogical fields; and (ii) summing the product and the per request fee.10. The computer of claim 6, wherein converting the abstract query intothe physical query comprises mapping each of the logical fields of theabstract query to respective physical entities of the physical data.